Skip to content

ci(android): overlap the smoke job CLI build with the fixture restore - #4663

Merged
thymikee merged 3 commits into
mainfrom
ci/android-smoke-setup-overlap
Nov 18, 2026
Merged

thymikee merged 3 commits into
mainfrom
ci/android-smoke-setup-overlap

Conversation

@thymikee

@thymikee thymikee commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

The Smoke Tests job built the CLI as the first command of its emulator script, so a booted emulator sat through a build that needs no device.

Build the CLI as a step instead, in one parallel: group with the fixture restore. The two share no outputs and write disjoint paths (dist/ versus .tmp/fixture-app through examples/test-app/node_modules). The restore is the slower of the two, so the build leaves the critical path. The system image keeps its slot next to the emulator step.

The two guards that read android.yml now open parallel: groups through runnableSteps, exported from scripts/gate/workflows.ts, the walk the gate manifest already used.

No device case is added, removed, or reordered.

Validation

Tested SHA c3568f5. All workflows green at that head; run 44186082690: job 335 s, build 9 s inside the 37 s restore group, no gate build in the emulator step.

  • pnpm check:gate-manifest — ok.
  • fixture-cache gate (test/ci/trusted-fixture-artifact.test.mjs) and scripts/__tests__/device-lane-impact.test.ts pass with the shared walk.
  • This lane's job duration on main ranges 259–470 s, so a 13–17 s saving is within noise. Per-run timings are in the PR comments.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.38 MB 6.38 MB 0 B
Package (unpacked) 6.38 MB 6.38 MB 0 B
Package (download) 1.94 MB 1.94 MB +2 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 36.6 ms 27.4 ms -9.2 ms
CLI --help 88.6 ms 62.0 ms -26.6 ms

The job built the CLI as the first command of the emulator script, so a
booted emulator waited for a build that needs no device. Build the CLI as
a step instead, in one parallel group with the fixture restore: the two
share no outputs, write disjoint paths, and the restore is the slower
one, so the build leaves the critical path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee
thymikee force-pushed the ci/android-smoke-setup-overlap branch from ee3e05d to 5b93ec2 Compare November 17, 2026 21:15
@thymikee thymikee changed the title ci(android): overlap smoke job setup and drop its duplicate build ci(android): overlap the smoke job CLI build with the fixture restore Nov 17, 2026
device-lane-impact.test.ts walked a job's flat step list, so a step inside
a parallel group read as no step and its gate went unchecked. Flatten the
groups before the walk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member Author

Timings

Read from the job logs. The lane's noise is wider than this change, so the table gives the main distribution next to the runs of this branch.

main (last 3 successful pushes) this branch
Smoke Tests job 326 s / 443 s / 470 s 395 s, 456 s
Restore fixture APK 59 s / 49 s / 66 s 63 s / 48 s
Run Android smoke checks 228 s / 354 s / 351 s 299 s / 360 s

Baseline for the step split: run 44154306220 job 331 s, where the emulator script opened with pnpm gate build and spent 17.4 s on it before the first case ran. That call is gone from the log now; the build runs as a step that shares a parallel group with the fixture restore (13 s build against 48 s restore on the latest run).

Emulator boot alone ranged 34 s to 63 s across these runs, and the fixture E2E 165 s to 244 s, so neither branch run can rank below the other on wall time. The removable wait is the one the change deletes: a booted emulator no longer sits through a build.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready from review at 163dc3e: the build and fixture restore overlap as intended, and I found no problems. One check is still queued, not failed. The other 18 checks are green at this head, including both Android Smoke Tests runs, Repo Guards & Compatibility and Integration Tests. There are no conflicts, and nothing else needs to happen before merge. No red run of the parallel group exists yet, so failure propagation is shown only by the workflow semantics.

Not blocking: these can be taken or left. The new flattenSteps in scripts/__tests__/device-lane-impact.test.ts is a third copy of the step-grouping helper, next to jobSteps in test/ci/trusted-fixture-artifact.test.mjs and the private runnableSteps in scripts/gate/workflows.ts, so exporting runnableSteps would remove the duplicates. The five-line comment at android.yml#L59 could shrink to the invariant (build writes dist/, restore writes .tmp/fixture-app and examples/test-app/node_modules). The roughly 13-17 s saving is below job noise, so linking one ci.yml run where a parallel member failed would show the group semantics.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 17, 2026
Export runnableSteps from scripts/gate/workflows.ts, which already opened
parallel groups for the gate manifest, and read workflow steps through it
in the Android lane guards. Keep the step type generic so the gate module
owns no test-only field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of c3568f5

No open findings.

Reviewed with this repository's own Sentinel configuration (655ede2796e5).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

Applied both notes in c3568f5.

  1. runnableSteps is now exported from scripts/gate/workflows.ts, where the same walk already opened parallel: groups for the gate manifest. Both guards read workflow steps through it and their local helper is gone. Its parameter is generic over { parallel?: readonly S[] } so the gate module keeps no test-only step field. test/ci/trusted-fixture-artifact.test.mjs imports it directly: the fixture-cache gate runs that file through node --experimental-strip-types scripts/node-test-tmpdir.ts, so the TypeScript helper loads there and the packaging-fixture limit does not apply.
  2. The android.yml comment now states only the disjoint-output constraint.

The Coverage failure on this head was coordinate errorTaxonomy timing out at 5000 ms. A re-run of the failed job passed.

Local: pnpm test:fixture-cache 16 pass, scripts/__tests__/device-lane-impact.test.ts 15 pass, pnpm check:gate-manifest ok, pnpm typecheck clean, pnpm check:layering OK. CI on c3568f5 is green for CI, Android, Apple, Linux and Size.

@thymikee

Copy link
Copy Markdown
Member Author

One more measured run, on head c3568f5: run 44186082690 — job 335 s, parallel group 37 s (build 9 s inside the 37 s restore), emulator step 253 s with no gate build in its log. Against the 331 s baseline sample, that is within the noise the table above already shows.

@thymikee thymikee removed the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 17, 2026
@thymikee

Copy link
Copy Markdown
Member Author

The code at c3568f5 looks good: the step reader is now shared instead of a third copy, as suggested. My earlier review at 163dc3e was also clean, so nothing from it is left open. The Smoke Tests change in android.yml, the update in scripts/gate/workflows.ts and the two guard tests all passed in CI at this head, so the changed route has run. All 19 checks pass, and there are no conflicts. The 335 s / 37 s / 9 s timings come from the PR body. Nothing else needs to happen before merge.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 17, 2026
@thymikee
thymikee merged commit 340e54f into main Nov 18, 2026
23 of 24 checks passed
@thymikee
thymikee deleted the ci/android-smoke-setup-overlap branch November 18, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant